﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlexFlow.Common.Collections
{
    /// <summary>
    /// 为自动清理列表提供接口
    /// </summary>
    public interface IAutoClearnCollection : IDisposable
    {
        /// <summary>
        /// 清理列表中超时的数据
        /// </summary>
        /// <returns>
        /// 被清理的项目集合
        /// </returns>
        IEnumerable<IClearnable> Clearn();
        /// <summary>
        /// 表示该集合的排他锁
        /// </summary>
        object SyncRoot { get; }
        /// <summary>
        /// 表示该集合是否已经被释放
        /// </summary>
        bool IsDisposed { get; }
    }
}
